﻿namespace BankInvest.InstrumentEditor.Domain.Entities
{
    public class Instrument
    {
        public virtual string Id { get; set; }

        public virtual string Name { get; set; }

        public virtual InstrumentType Type { get; set; }

        public virtual bool IsActive { get; set; }

        public virtual bool Equals(Instrument other)
        {
            return other != null && Equals(other.Id, Id);
        }

        public override bool Equals(object obj)
        {
            return Equals(obj as Instrument);
        }

        public override int GetHashCode()
        {
            return Id.GetHashCode();
        }
    }
}